Case by Case problem DXL

Hello my problem is simple but i dont know how to handle this. I have different views Ex_1 Ex_2 Ex_3 an for each View i need different options. Also i need a dxl script with the function to check case by case each view.
Thank you for help
SystemAdmin - Mon Aug 23 03:20:46 EDT 2010

Re: Case by Case problem DXL
SystemAdmin - Mon Aug 23 03:25:35 EDT 2010

Is it possible to check the actually view from the actually Doors window.

Re: Case by Case problem DXL
llandale - Thu Aug 26 16:50:27 EDT 2010

Not sure what you are asking; but perhaps the following will help.

Command currentView(mod) gets the name of the currently loaded view in the Module. Perhaps that's helpful if you DXL is running as a layout; e.g.

string    NameCurrentView = currentView(mod)
if (NameCurrentView == "ABC")
{}   // do ABC processing
elseif (NameCurrentView == "XYZ")
{}   // do XYZ processing
else
{}   // do unknown view Processing

 


You can loop through existing views and load them.

 

 

for NameView in views(mod) do
{  load(mod, view(NameView))
   // deal with view
}

 

 

  • Louie

 

Re: Case by Case problem DXL
SystemAdmin - Fri Aug 27 07:48:55 EDT 2010

llandale - Thu Aug 26 16:50:27 EDT 2010

Not sure what you are asking; but perhaps the following will help.

Command currentView(mod) gets the name of the currently loaded view in the Module. Perhaps that's helpful if you DXL is running as a layout; e.g.

string    NameCurrentView = currentView(mod)
if (NameCurrentView == "ABC")
{}   // do ABC processing
elseif (NameCurrentView == "XYZ")
{}   // do XYZ processing
else
{}   // do unknown view Processing

 


You can loop through existing views and load them.

 

 

for NameView in views(mod) do
{  load(mod, view(NameView))
   // deal with view
}

 

 

  • Louie

 

Okay thanks for your help but i think that isnt exactly what i want.

My code is..

Module m = current
aview = currentView(m)

if(aview == "view1")
{
...
Here i search some code with the function to add some of the attributes
...
}

if(aview == "view2")
{
...
Here should be some other attributes shown
...

}
Now i have this code but i think its very unprofensiell especially if there a some changes by the attributes

int x=0
AttrDef ad
for ad in current Module do {
x++
ad.name "\n"
if (x==3||x==40||x==42||x==65||x==66||x==68||x==69||x==70||x==71||x==72)
results = results "\n" ad.name

}